package com.gree.framework.entity;

import lombok.Data;
import lombok.NoArgsConstructor;
import org.nutz.dao.entity.annotation.Column;
import org.nutz.dao.entity.annotation.Name;
import org.nutz.dao.entity.annotation.Table;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

/**
 * Created by 180686 on 2021/3/17 9:31
 */

@Data
@NoArgsConstructor
@Table("scm_sys_user")
public class SysUserEx {
    /**
     * 用户ID
     */
    @Column
    private int userId;

    /**
     * 用户名
     */
    @Name
    private String userName;

    /**
     * 用户中文名称
     */
    @Column
    private String chineseName;

    /**
     * 密码
     */
    @Column
    private String pwd;

    /**
     * 登录IP
     */
    @Column
    private String loginIp;

    /**
     * 部门ID
     */
    @Column
    private String depId;

    /**
     * 部门名称
     */
    @Column
    private String depName;

    /**
     * 是否可用,0=否;1=是
     */
    @Column
    private int isEnable;

    /**
     * 是否过期,0=否;1=是
     */
    @Column
    private int accountNonExpired;

    /**
     * 是否锁定,0=否;1=是
     */
    @Column
    private int accountNonLocked;

    /**
     * 证书是否可用,0=否;1=是
     */
    @Column
    private int credentialsNonExpired;

    /**
     * 邮箱
     */
    @Column
    private String mail;

    /**
     * 头像路径
     */
    @Column
    private String avatar;

    /**
     * 创建时间
     */
    @Column
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createDt;

    /**
     * 最后登录时间
     */
    @Column
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime lastLoginDt;

    /**
     * 失效时期
     */
    @Column
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime deadlineDt;

    /**
     * 更新时间
     */
    @Column
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateDt;

    /**
     * 简介
     */
    @Column
    private String introduction;

}